package com.ruoyi.base.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.StationInfoMapper;
import com.ruoyi.base.domain.StationInfo;
import com.ruoyi.base.service.IStationInfoService;

/**
 * 气站信息
Service业务层处理
 * 
 * @author h w
 * @date 2022-12-09
 */
@Service
public class StationInfoServiceImpl implements IStationInfoService 
{
    @Autowired
    private StationInfoMapper stationInfoMapper;

    /**
     * 查询气站信息

     * 
     * @param stationId 气站信息
主键
     * @return 气站信息

     */
    @Override
    public StationInfo selectStationInfoByStationId(Long stationId)
    {
        return stationInfoMapper.selectStationInfoByStationId(stationId);
    }

    /**
     * 查询气站信息
列表
     * 
     * @param stationInfo 气站信息

     * @return 气站信息

     */
    @Override
    public List<StationInfo> selectStationInfoList(StationInfo stationInfo)
    {
        return stationInfoMapper.selectStationInfoList(stationInfo);
    }

    /**
     * 新增气站信息

     * 
     * @param stationInfo 气站信息

     * @return 结果
     */
    @Override
    public int insertStationInfo(StationInfo stationInfo)
    {
        stationInfo.setCreateTime(DateUtils.getNowDate());
        return stationInfoMapper.insertStationInfo(stationInfo);
    }

    /**
     * 修改气站信息

     * 
     * @param stationInfo 气站信息

     * @return 结果
     */
    @Override
    public int updateStationInfo(StationInfo stationInfo)
    {
        stationInfo.setUpdateTime(DateUtils.getNowDate());
        return stationInfoMapper.updateStationInfo(stationInfo);
    }

    /**
     * 批量删除气站信息

     * 
     * @param stationIds 需要删除的气站信息
主键
     * @return 结果
     */
    @Override
    public int deleteStationInfoByStationIds(Long[] stationIds)
    {
        return stationInfoMapper.deleteStationInfoByStationIds(stationIds);
    }

    /**
     * 删除气站信息
信息
     * 
     * @param stationId 气站信息
主键
     * @return 结果
     */
    @Override
    public int deleteStationInfoByStationId(Long stationId)
    {
        return stationInfoMapper.deleteStationInfoByStationId(stationId);
    }
}
